/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Client.Online;

import javax.swing.JLabel;

/**
 *
 * @author TienNT
 */
public class ContactCell extends javax.swing.JPanel {

    /**
     * Creates new form ContactCell
     */
    public ContactCell() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblContactIcon = new javax.swing.JLabel();
        lblStatusIcon = new javax.swing.JLabel();
        lblClientName = new javax.swing.JLabel();
        lblStatusText = new javax.swing.JLabel();

        lblContactIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon.png"))); // NOI18N
        lblContactIcon.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        lblStatusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/online.png"))); // NOI18N

        lblClientName.setText("Contact name");

        lblStatusText.setText("Status: boring");
        lblStatusText.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                lblStatusTextMouseEntered(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addComponent(lblContactIcon)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblStatusIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblStatusText, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE)
                    .addComponent(lblClientName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(5, 5, 5))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblStatusIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(lblClientName)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblStatusText))
                        .addComponent(lblContactIcon, javax.swing.GroupLayout.Alignment.LEADING)))
                .addGap(5, 5, 5))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void lblStatusTextMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lblStatusTextMouseEntered
        // TODO add your handling code here:
        lblStatusText.setToolTipText(lblStatusText.getText());
    }//GEN-LAST:event_lblStatusTextMouseEntered

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel lblClientName;
    private javax.swing.JLabel lblContactIcon;
    private javax.swing.JLabel lblStatusIcon;
    private javax.swing.JLabel lblStatusText;
    // End of variables declaration//GEN-END:variables

    public JLabel getLblClientName() {
        return lblClientName;
    }

    public JLabel getLblContactIcon() {
        return lblContactIcon;
    }

    public JLabel getLblStatusIcon() {
        return lblStatusIcon;
    }

    public JLabel getLblStatusText() {
        return lblStatusText;
    }
}
